Merged
Conversation
Collaborator
|
You should explain the motivation and benefit for the migration of PortAudio. |
6d42303 to
6e00d27
Compare
Collaborator
|
Build failure: |
Collaborator
Author
Thanks for the reminder! |
f26f174 to
e331ed7
Compare
jserv
reviewed
Mar 1, 2025
e331ed7 to
e7184f0
Compare
jserv
reviewed
Mar 1, 2025
e7184f0 to
a73d91d
Compare
jserv
reviewed
Mar 1, 2025
c270822 to
856807d
Compare
Collaborator
Author
To make sure whether the hrtimer resolve the stuttering and sending invalid stream ID issues. |
Collaborator
Author
|
Hi @jserv , I would like to summarize the current progress:
|
5d0f852 to
d6b9ac6
Compare
jserv
reviewed
Jun 1, 2025
jserv
reviewed
Jun 1, 2025
d6b9ac6 to
7dd3664
Compare
jserv
requested changes
Jun 4, 2025
Collaborator
jserv
left a comment
There was a problem hiding this comment.
Rebase the latest master branch.
7dd3664 to
99e44c7
Compare
jserv
reviewed
Jun 4, 2025
99e44c7 to
1e978fd
Compare
jserv
reviewed
Jun 4, 2025
jserv
reviewed
Jun 4, 2025
jserv
reviewed
Jun 4, 2025
Switch to PortAudio for cross-platform and cross backend compatibility. Linux v6.7 propose a solution to resolve sound stutter effect. Therefore, upgrade the kernel version as well. It is confirmed that there exists unknown issues in Linux Kernel that user has to adjust the buffer size to more than four times of period size, or the program cannot write PCM frames into guest ALSA stack.
1e978fd to
d26f0dd
Compare
shengwen-tw
added a commit
to shengwen-tw/semu
that referenced
this pull request
Jun 8, 2025
Fixes a compilation error introduced in sysprog21#76, where the `make all` target fails during the build of the PortAudio library on GNU/Linux systems. The failure was caused by a missing `-lsndio` linker flag. Adding this flag resolves the issue and allows the build to complete successfully.
shengwen-tw
added a commit
to shengwen-tw/semu
that referenced
this pull request
Jun 8, 2025
Fixes a compilation error introduced in sysprog21#76, where the `make all` target fails during the build of the PortAudio library on GNU/Linux systems. The failure was caused by a missing `-lsndio` linker flag. Adding this flag resolves the issue and allows the build to complete successfully.
shengwen-tw
added a commit
to shengwen-tw/semu
that referenced
this pull request
Jun 9, 2025
Fixes a compilation error introduced in sysprog21#76, where the `make all` target fails during the build of the PortAudio library on GNU/Linux systems. The failure was caused by PortAudio's configure script automatically enabling the sndio backend when `libsndio-dev` headers are present, which leads to linker errors due to missing `-lsndio`. To avoid this, we now explicitly pass `--without-sndio` to PortAudio’s configure script. This ensures that sndio support is disabled regardless of system headers, eliminating the need for `-lsndio` and fixing the build.
ChinYikMing
added a commit
to ChinYikMing/semu
that referenced
this pull request
Jun 9, 2025
Quote from portaudio/config.log: ... configure:3194: checking whether the C compiler works configure:3216: gcc -I/opt/homebrew/opt/zlib/include portaudio/lib/.libs/libportaudio.a -framework CoreServices -framework CoreFoundation -framework AudioUnit -framewo rk AudioToolbox -framework CoreAudio -lpthread -lm mini-gdbstub/build/libgdbstub.a conftest.c >&5 clang: error: no such file or directory: 'portaudio/lib/.libs/libportaudio.a' ... configure:3265: error: C compiler cannot create executables ... The ./configure script fails on macOS because LDFLAGS includes static libraries (libportaudio.a) that have not yet been built. This causes the compiler check to fail with "C compiler cannot create executables". This patch unsets LDFLAGS during the configure step to allow the test program to compile and link successfully, enabling builds on macOS. Related: sysprog21#76
ChinYikMing
added a commit
to ChinYikMing/semu
that referenced
this pull request
Jun 10, 2025
Quote from portaudio/config.log: ... configure:3194: checking whether the C compiler works configure:3216: gcc -I/opt/homebrew/opt/zlib/include portaudio/lib/.libs/libportaudio.a -framework CoreServices -framework CoreFoundation -framework AudioUnit -framewo rk AudioToolbox -framework CoreAudio -lpthread -lm mini-gdbstub/build/libgdbstub.a conftest.c >&5 clang: error: no such file or directory: 'portaudio/lib/.libs/libportaudio.a' ... configure:3265: error: C compiler cannot create executables ... The ./configure script fails on macOS because LDFLAGS includes static libraries (libportaudio.a) that have not yet been built. This causes the compiler check to fail with "C compiler cannot create executables". This patch unsets LDFLAGS during the configure step to allow the test program to compile and link successfully, enabling builds on macOS. Related: sysprog21#76
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switch to PortAudio for cross-platform and cross backend compatibility.
Testing
Preparation
make build-imageto build Linux Kernel image and root filesystem.Test Cases
play white noise
test procedures
speaker-testin emulator shell.expected results
play sequence sound
test procedures
aplay /usr/share/sounds/alsa/Front_Center.wavin emulator.aplay /usr/share/sounds/alsa/Front_Center.wavin emulator.expected results
Summary by Bito
This pull request integrates PortAudio to enhance cross-platform audio playback, replacing the previous CNFA submodule. It updates the Makefile for better build configurations, addresses issues like sound loss and system crashes, and improves PCM stream handling and compatibility, while also updating documentation.Unit tests added: False
Estimated effort to review (1-5, lower is better): 2